package com.top.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Autor zhangjiawen
 * @Date: 2020/8/4 13:35
 */
@TableName("BLADE_LOG_API")
public class LogApi implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    @TableId(
            value = "id",
            type = IdType.ID_WORKER
    )
    private Long id;
    private String type;
    private String title;
    private String serviceId;
    private String serverIp;
    private String serverHost;
    private String env;
    private String remoteIp;
    private String userAgent;
    private String requestUri;
    private String method;
    private String methodClass;
    private String methodName;
    private String params;
    private String time;
    private String createBy;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date createTime;

    public LogApi() {
    }

    public Long getId() {
        return this.id;
    }

    public String getType() {
        return this.type;
    }

    public String getTitle() {
        return this.title;
    }

    public String getServiceId() {
        return this.serviceId;
    }

    public String getServerIp() {
        return this.serverIp;
    }

    public String getServerHost() {
        return this.serverHost;
    }

    public String getEnv() {
        return this.env;
    }

    public String getRemoteIp() {
        return this.remoteIp;
    }

    public String getUserAgent() {
        return this.userAgent;
    }

    public String getRequestUri() {
        return this.requestUri;
    }

    public String getMethod() {
        return this.method;
    }

    public String getMethodClass() {
        return this.methodClass;
    }

    public String getMethodName() {
        return this.methodName;
    }

    public String getParams() {
        return this.params;
    }

    public String getTime() {
        return this.time;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setType(final String type) {
        this.type = type;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public void setServiceId(final String serviceId) {
        this.serviceId = serviceId;
    }

    public void setServerIp(final String serverIp) {
        this.serverIp = serverIp;
    }

    public void setServerHost(final String serverHost) {
        this.serverHost = serverHost;
    }

    public void setEnv(final String env) {
        this.env = env;
    }

    public void setRemoteIp(final String remoteIp) {
        this.remoteIp = remoteIp;
    }

    public void setUserAgent(final String userAgent) {
        this.userAgent = userAgent;
    }

    public void setRequestUri(final String requestUri) {
        this.requestUri = requestUri;
    }

    public void setMethod(final String method) {
        this.method = method;
    }

    public void setMethodClass(final String methodClass) {
        this.methodClass = methodClass;
    }

    public void setMethodName(final String methodName) {
        this.methodName = methodName;
    }

    public void setParams(final String params) {
        this.params = params;
    }

    public void setTime(final String time) {
        this.time = time;
    }

    public void setCreateBy(final String createBy) {
        this.createBy = createBy;
    }

    public void setCreateTime(final Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof LogApi)) {
            return false;
        } else {
            LogApi other = (LogApi)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label215: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label215;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label215;
                    }

                    return false;
                }

                Object this$type = this.getType();
                Object other$type = other.getType();
                if (this$type == null) {
                    if (other$type != null) {
                        return false;
                    }
                } else if (!this$type.equals(other$type)) {
                    return false;
                }

                label201: {
                    Object this$title = this.getTitle();
                    Object other$title = other.getTitle();
                    if (this$title == null) {
                        if (other$title == null) {
                            break label201;
                        }
                    } else if (this$title.equals(other$title)) {
                        break label201;
                    }

                    return false;
                }

                Object this$serviceId = this.getServiceId();
                Object other$serviceId = other.getServiceId();
                if (this$serviceId == null) {
                    if (other$serviceId != null) {
                        return false;
                    }
                } else if (!this$serviceId.equals(other$serviceId)) {
                    return false;
                }

                label187: {
                    Object this$serverIp = this.getServerIp();
                    Object other$serverIp = other.getServerIp();
                    if (this$serverIp == null) {
                        if (other$serverIp == null) {
                            break label187;
                        }
                    } else if (this$serverIp.equals(other$serverIp)) {
                        break label187;
                    }

                    return false;
                }

                Object this$serverHost = this.getServerHost();
                Object other$serverHost = other.getServerHost();
                if (this$serverHost == null) {
                    if (other$serverHost != null) {
                        return false;
                    }
                } else if (!this$serverHost.equals(other$serverHost)) {
                    return false;
                }

                label173: {
                    Object this$env = this.getEnv();
                    Object other$env = other.getEnv();
                    if (this$env == null) {
                        if (other$env == null) {
                            break label173;
                        }
                    } else if (this$env.equals(other$env)) {
                        break label173;
                    }

                    return false;
                }

                label166: {
                    Object this$remoteIp = this.getRemoteIp();
                    Object other$remoteIp = other.getRemoteIp();
                    if (this$remoteIp == null) {
                        if (other$remoteIp == null) {
                            break label166;
                        }
                    } else if (this$remoteIp.equals(other$remoteIp)) {
                        break label166;
                    }

                    return false;
                }

                Object this$userAgent = this.getUserAgent();
                Object other$userAgent = other.getUserAgent();
                if (this$userAgent == null) {
                    if (other$userAgent != null) {
                        return false;
                    }
                } else if (!this$userAgent.equals(other$userAgent)) {
                    return false;
                }

                label152: {
                    Object this$requestUri = this.getRequestUri();
                    Object other$requestUri = other.getRequestUri();
                    if (this$requestUri == null) {
                        if (other$requestUri == null) {
                            break label152;
                        }
                    } else if (this$requestUri.equals(other$requestUri)) {
                        break label152;
                    }

                    return false;
                }

                label145: {
                    Object this$method = this.getMethod();
                    Object other$method = other.getMethod();
                    if (this$method == null) {
                        if (other$method == null) {
                            break label145;
                        }
                    } else if (this$method.equals(other$method)) {
                        break label145;
                    }

                    return false;
                }

                Object this$methodClass = this.getMethodClass();
                Object other$methodClass = other.getMethodClass();
                if (this$methodClass == null) {
                    if (other$methodClass != null) {
                        return false;
                    }
                } else if (!this$methodClass.equals(other$methodClass)) {
                    return false;
                }

                Object this$methodName = this.getMethodName();
                Object other$methodName = other.getMethodName();
                if (this$methodName == null) {
                    if (other$methodName != null) {
                        return false;
                    }
                } else if (!this$methodName.equals(other$methodName)) {
                    return false;
                }

                label124: {
                    Object this$params = this.getParams();
                    Object other$params = other.getParams();
                    if (this$params == null) {
                        if (other$params == null) {
                            break label124;
                        }
                    } else if (this$params.equals(other$params)) {
                        break label124;
                    }

                    return false;
                }

                Object this$time = this.getTime();
                Object other$time = other.getTime();
                if (this$time == null) {
                    if (other$time != null) {
                        return false;
                    }
                } else if (!this$time.equals(other$time)) {
                    return false;
                }

                Object this$createBy = this.getCreateBy();
                Object other$createBy = other.getCreateBy();
                if (this$createBy == null) {
                    if (other$createBy != null) {
                        return false;
                    }
                } else if (!this$createBy.equals(other$createBy)) {
                    return false;
                }

                Object this$createTime = this.getCreateTime();
                Object other$createTime = other.getCreateTime();
                if (this$createTime == null) {
                    if (other$createTime != null) {
                        return false;
                    }
                } else if (!this$createTime.equals(other$createTime)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof LogApi;
    }


    @Override
    public String toString() {
        return "LogApi(id=" + this.getId() + ", type=" + this.getType() + ", title=" + this.getTitle() + ", serviceId=" + this.getServiceId() + ", serverIp=" + this.getServerIp() + ", serverHost=" + this.getServerHost() + ", env=" + this.getEnv() + ", remoteIp=" + this.getRemoteIp() + ", userAgent=" + this.getUserAgent() + ", requestUri=" + this.getRequestUri() + ", method=" + this.getMethod() + ", methodClass=" + this.getMethodClass() + ", methodName=" + this.getMethodName() + ", params=" + this.getParams() + ", time=" + this.getTime() + ", createBy=" + this.getCreateBy() + ", createTime=" + this.getCreateTime() + ")";
    }
}